var max=0;function AsylumNavLink(parentId,linkId,order,href,linkText,target,width)
{this.linkId=linkId;this.parentId=parentId;this.order=order;this.href=href;this.linkText=linkText;this.target=target;this.width=width;};function AsylumNav(contId,layout,offset)
{this.menuCont=document.getElementById(contId);this.layout=layout;this.offset=(typeof offset=='undefined'?'Right':offset);this.menuItems=new Object();this.clickUnderCreated=false;};AsylumNav.prototype.AddLink=function(parentId,linkId,order,href,linkText,target,width)
{if(typeof this.menuItems[parentId]=='undefined')
{this.menuItems[parentId]=new Object();}
if(typeof width=="undefined")width=false;this.menuItems[parentId][linkId]=new AsylumNavLink(parentId,linkId,order,href,linkText,target,width);if(order>max){max=order;}};AsylumNav.prototype.CreateLevel=function(levelId,idPrefix)
{obj=this;div=document.createElement('div');div.id=idPrefix+levelId;div.levelId=levelId;div.idPrefix=idPrefix;div.className='levelDiv';div.onmouseout=function(e){obj.HideLevel(e);};div.subLevels=new Object();if(levelId!='0')
{div.style.visibility='hidden';div.className+=' subLevel';div.style.position='absolute';}
else
{div.className+=' topLevel';}
if(this.layout=='Horizontal')
{div.style.position='absolute';}
div.style.zIndex=10;if(this.menuCont){this.menuCont.appendChild(div);}
for(i=0;i<=max;i++){for(linkId in this.menuItems[levelId]){if(this.menuItems[levelId][linkId].order==i){linkDiv=document.createElement('div');linkDiv.id='asylumNavLinkDiv'+linkId;linkDiv.linkId=linkId;linkDiv.levelId=levelId;linkDiv.className='linkDiv';if(levelId=="0"){linkDiv.className+=" topLevel";if(this.menuItems[levelId][linkId].width){linkDiv.style.width=this.menuItems[levelId][linkId].width+"px";}}
div.appendChild(linkDiv);navLink=this.menuItems[levelId][linkId];a=document.createElement('a');a.id='asylumNavLink'+linkId;a.linkType='navMenu';a.linkId=linkId;a.levelId=navLink.parentId;a.parentId=navLink.parentId;if(navLink.href==''||navLink.href=='#')
{a.href='#';a.target='';a.style.cursor='default';}
else
{a.href=navLink.href;a.target=navLink.target;}
if(this.layout=='Vertical')
{a.innerHTML=navLink.linkText;}
else
{a.innerHTML=navLink.linkText.split(' ').join('&nbsp;');}
a.onmouseover=function(){obj.ShowLevel(this);};linkDiv.appendChild(a);if(linkId==pageId)
{a.className='activeLink';linkDiv.className+=' activeLink';topLink=this.GetTopLevelLink(navLink);if(typeof this.menuItems[topLink.linkId]!='undefined'&&navLink.levelId!='0')
{try{document.getElementById('asylumNavLink'+topLink.linkId).className+=' activeLink';document.getElementById('asylumNavLinkDiv'+topLink.linkId).className+=' activeLink';}catch(e){}}
if(document.getElementById("clickUnder")!=null)
{this.CreateClickUnder(topLink,true);}}
else
{}
if(typeof this.menuItems[linkId]!='undefined')
{div.subLevels[linkId]=true;}}}}
return div;};AsylumNav.prototype.Construct=function()
{if(this.menuCont==null){return;}
var obj=this;for(levelId in this.menuItems)
{this.CreateLevel(levelId,'asylumNavLevel');}
if(this.layout=='Vertical')
{if(typeof document.getElementById('tplMainSectors')!=null)
{ms=document.getElementById('tplMainSectors');ms.style.height=ms.offsetHeight;}}
else
{this.menuCont.style.height=document.getElementById('asylumNavLevel0').offsetHeight+'px';}
this.CreateBreadCrumbs();};AsylumNav.prototype.CreateClickUnder=function(navLink,active)
{if(typeof doneClickUnder=="undefined"){doneClickUnder=true;}else{return;}
if(document.getElementById("clickUnder")==null)return;obj=this;var linkId;if(this.layout=='Vertical')
{clickDiv=document.createElement('div');clickDiv.id="clickUnder";document.getElementById("clickUnder").appendChild(clickDiv);linkDiv=document.getElementById('asylumNavLinkDiv'+navLink.linkId);linkDiv.appendChild(clickDiv);}
else
{clickDiv=document.getElementById("clickUnder");}
var linkCount=0;for(linkId in this.menuItems[navLink.linkId])
{linkCount++;clickLinkDiv=document.createElement('div');clickLinkDiv.className='clickLinkDiv';clickLink=this.menuItems[navLink.linkId][linkId];txt=document.createTextNode(' ');clickDiv.appendChild(txt);a=document.createElement('a');a.id='asylumNavClickLink'+clickLink.linkId;a.className='clickLink';a.linkType='clickLink';a.linkId=linkId;a.levelId=clickLink.parentId;a.parentId=clickLink.parentId;if(clickLink.href==''||clickLink.href=='#'){a.href='#';a.target='';a.style.cursor='default';}else{a.href=clickLink.href;a.target=clickLink.target;}
if(this.layout=="Vertical"){a.innerHTML=clickLink.linkText;}else if(this.layout=="Horizontal-SubMenu"){if(clickLink.linkText.substring(0,1)==" "){a.innerHTML=clickLink.linkText.split(" ").join("&nbsp;");}else{a.innerHTML=clickLink.linkText;}}else{a.innerHTML=clickLink.linkText.split(" ").join("&nbsp;");}
a.onmouseover=function(){obj.HideAllLevels();obj.ShowLevel(this);};a.onmouseout=function(e){obj.HideLevel(e);};clickLinkDiv.appendChild(a);if(linkId==pageId)
{a.className='activeLink';clickLinkDiv.className+=' activeLink';}
clickDiv.appendChild(clickLinkDiv);txt=document.createTextNode(' ');clickDiv.appendChild(txt);}
if(linkCount==0||active==false)
{clickDiv.className='inactiveClickUnder';}
else
{clickDiv.className='activeClickUnder';}};AsylumNav.prototype.GetTopLevelLink=function(navLink)
{if(navLink.parentId=='0')
{return(navLink);}
while(1==1)
{navLink=this.GetParentLink(navLink);if(typeof navLink.parentId!='undefined')
{if(navLink.parentId=='0')
{break;}}}
return(navLink);};AsylumNav.prototype.GetParentLink=function(navLink)
{var levelId;var linkId;for(levelId in this.menuItems)
{for(linkId in this.menuItems[levelId])
{parNavLink=this.menuItems[levelId][linkId];if(parNavLink.linkId==navLink.parentId)
{return(parNavLink);}}}};AsylumNav.prototype.GetXPos=function(obj)
{var curleft=0;if(obj.offsetParent)
{while(obj.offsetParent&&obj.id!='navMenuCont')
{curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(obj.x)
curleft+=obj.x;return curleft;};AsylumNav.prototype.GetYPos=function(obj)
{var curtop=0;if(obj.offsetParent)
{while(obj.offsetParent&&obj.id!='navMenuCont')
{curtop+=obj.offsetTop;obj=obj.offsetParent;}}
else if(obj.y)
curtop+=obj.y;return curtop;};AsylumNav.prototype.ShowLevel=function(el)
{levelId=el.linkId;this.currentLevelId=levelId;window.clearTimeout(this.timeoutId);this.HideSubLevels(el.levelId);if(typeof this.menuItems[levelId]=='undefined')
{return;}
if(el.linkType=='clickLink')
{eP=document.getElementById('asylumNavClickLink'+el.linkId);eL=document.getElementById('asylumNavLevel'+levelId);SwapClass(eL,'subLevel','clickUnderSubLevel');}
else
{eP=document.getElementById('asylumNavLink'+levelId);eL=document.getElementById('asylumNavLevel'+levelId);SwapClass(eL,'clickUnderSubLevel','subLevel');}
if(eP.parentId=='0')
{switch(this.offset)
{case'Right':offsetX=(eP.offsetWidth);offsetY=0;break;case'Left':offsetX=(-eL.offsetWidth);offsetY=0;break;case'Bottom':offsetX=0;offsetY=eP.offsetHeight;eL.style.minWidth=eP.offsetWidth;break;}}
else
{switch(this.offset)
{case'Left':offsetX=(-eL.offsetWidth);offsetY=0;break;default:offsetX=(eP.offsetWidth);offsetY=0;break;}}
pX=this.GetXPos(eP);pY=this.GetYPos(eP);lX=pX+offsetX;lY=pY+offsetY;eL.style.position='absolute';$(eL).css({left:lX,top:lY});eL.style.visibility='visible';};AsylumNav.prototype.GetLevelWidth=function(levelId)
{maxWidth=0;for(linkId in this.menuItems[levelId])
{a=document.getElementById('asylumNavLink'+linkId);thisWidth=a.offsetWidth;if(thisWidth>maxWidth)
{maxWidth=thisWidth;}}
return(maxWidth);};AsylumNav.prototype.HideSubLevels=function(levelId,omitLevelId)
{if(typeof omitLevelId=='undefined')
{omitLevelId='0';}
eL=document.getElementById('asylumNavLevel'+levelId);for(levelId in eL.subLevels)
{this.HideSubLevels(levelId);if(levelId!=omitLevelId)
{eL=document.getElementById('asylumNavLevel'+levelId);eL.style.visibility='hidden';}}};AsylumNav.prototype.HideLevel=function(e)
{window.clearTimeout(this.timeoutId);if(!e)e=window.event;var el=(e.relatedTarget)?e.relatedTarget:e.toElement;var obj=this;var funct=function(){obj._HideLevel(el);};this.timeoutId=window.setTimeout(funct,1000);};AsylumNav.prototype._HideLevel=function(el)
{if(!el||el.id.substr(0,9)!='asylumNav'||(el.id.substr(0,9)=='asylumNav'&&el.style.visibility=='hidden'))
{this.HideAllLevels();}};AsylumNav.prototype.HideAllLevels=function()
{for(levelId in this.menuItems)
{if(levelId!='0')
{eL=document.getElementById('asylumNavLevel'+levelId);if(eL!=null)eL.style.visibility='hidden';}}};AsylumNav.prototype.CreateBreadCrumbs=function()
{if(document.getElementById("breadCrumbs")!=null)
{crumbsCont=document.getElementById("breadCrumbs");crumbsCont.style.display='none';crumbs='';homeLink='';for(levelId in this.menuItems)
{for(linkId in this.menuItems[levelId])
{navLink=this.menuItems[levelId][linkId];if(homeLink=='')
{homeLink='<a href="'+navLink.href+'" target="'+navLink.target+'">'
+navLink.linkText+'</a> &gt; ';}
if(linkId==pageId)
{i=0;parNavLink=this.GetParentLink(navLink);while(typeof parNavLink=='object')
{i++;crumbs='<a href="'+parNavLink.href+'" target="'+parNavLink.target+'">'
+parNavLink.linkText+'</a> &gt; '+crumbs;parNavLink=this.GetParentLink(parNavLink);}
if(i>1)
{crumbsCont.style.display='block';crumbsCont.innerHTML=homeLink+crumbs+'<span class="activeCrumb">'+navLink.linkText+'</span>';}
return(true);}}}}};function RemoveClass(el,className)
{var replaceName=(el.className.match(' '+className)?' '+className:className);el.className=el.className.replace(replaceName,'');};function AddClass(el,className)
{RemoveClass(el,className);el.className+=' '+className;};function SwapClass(el,removeClassName,addClassName)
{RemoveClass(el,removeClassName);AddClass(el,addClassName);};;$(function() {for (var i in tasks) {window.setTimeout(tasks[i], 0);}});function initMenu(){};$(function(){$("#navMenu").navmenu({pageInfo:{"a229048":{"P":0,"ID":235772,"C":229048,"O":0,"U":"http:\/\/www.drycomalcreek.com\/","N":"Home","T":"_top","R":"","RT":"_blank"},"a229049":{"P":229048,"ID":237594,"C":229049,"O":"1","U":"http:\/\/www.drycomalcreek.com\/history-people-wines.html","N":"About Us","T":"_top","R":"","RT":"_blank"},"a256914":{"P":229049,"ID":256915,"C":256914,"O":"1","U":"http:\/\/www.drycomalcreek.com\/contact-us.html","N":"Contact Us","T":"_top","R":"","RT":"_blank"},"a588231":{"P":229049,"ID":588232,"C":588231,"O":"2","U":"http:\/\/www.drycomalcreek.com\/black-spanish-vineyard.html","N":"Vintage Oaks at the Vineyard","T":"_top","R":"","RT":"_blank"},"a256918":{"P":229049,"ID":256926,"C":256918,"O":"3","U":"http:\/\/www.drycomalcreek.com\/links-our-favorite.html","N":"Links","T":"_top","R":"","RT":"_blank"},"a610269":{"P":229049,"ID":620798,"C":610269,"O":"4","U":"http:\/\/www.drycomalcreek.com\/dccvblog.html","N":"DCCV Blog","T":"_top","R":"","RT":"_blank"},"a620111":{"P":229049,"ID":620795,"C":620111,"O":"5","U":"http:\/\/www.drycomalcreek.com\/inthemedia.html","N":"In The News and other Media","T":"_top","R":"","RT":"_blank"},"a229050":{"P":229048,"ID":240222,"C":229050,"O":"2","U":"http:\/\/www.drycomalcreek.com\/wines-dry-comal.html","N":"Our Wines","T":"_top","R":"","RT":"_blank"},"a255190":{"P":229050,"ID":255192,"C":255190,"O":"1","U":"http:\/\/www.drycomalcreek.com\/dry-white-wines.html","N":"Dry White Wines","T":"_top","R":"","RT":"_blank"},"a255191":{"P":229050,"ID":255193,"C":255191,"O":"2","U":"http:\/\/www.drycomalcreek.com\/demi-sweet-wines.html","N":"Demi-Sweet Wines","T":"_top","R":"","RT":"_blank"},"a255194":{"P":229050,"ID":255195,"C":255194,"O":"3","U":"http:\/\/www.drycomalcreek.com\/red-wines.html","N":"Red Wines","T":"_top","R":"","RT":"_blank"},"a255196":{"P":229050,"ID":255197,"C":255196,"O":"4","U":"http:\/\/www.drycomalcreek.com\/reserve-wines.html","N":"Reserve Wines","T":"_top","R":"","RT":"_blank"},"a524707":{"P":229050,"ID":524712,"C":524707,"O":"5","U":"http:\/\/www.drycomalcreek.com\/sparklingwines.html","N":"Sparkling Wines","T":"_top","R":"","RT":"_blank"},"a255198":{"P":229050,"ID":255199,"C":255198,"O":"6","U":"http:\/\/www.drycomalcreek.com\/ports.html","N":"Ports","T":"_top","R":"","RT":"_blank"},"a255200":{"P":229050,"ID":255201,"C":255200,"O":"7","U":"http:\/\/www.drycomalcreek.com\/unique-gift-items.html","N":"Unique Gift Items","T":"_top","R":"","RT":"_blank"},"a360207":{"P":229050,"ID":360442,"C":360207,"O":"8","U":"http:\/\/www.drycomalcreek.com\/holiday-gift-ideas.html","N":"Holiday Gift Ideas","T":"_top","R":"","RT":"_blank"},"a440838":{"P":229050,"ID":440947,"C":440838,"O":"9","U":"http:\/\/www.drycomalcreek.com\/giftbaskets.html","N":"GiftBaskets","T":"_top","R":"","RT":"_blank"},"a229051":{"P":229048,"ID":240224,"C":229051,"O":"3","U":"http:\/\/www.drycomalcreek.com","N":"Our Winery","T":"_top","R":"","RT":"_blank"},"a240236":{"P":229051,"ID":240237,"C":240236,"O":"1","U":"http:\/\/www.drycomalcreek.com\/tasting-room-dry.html","N":"Tasting Room","T":"_top","R":"","RT":"_blank"},"a240243":{"P":229051,"ID":240244,"C":240243,"O":"2","U":"http:\/\/www.drycomalcreek.com\/private-events-dry.html","N":"Private Events","T":"_top","R":"","RT":"_blank"},"a240245":{"P":229051,"ID":240246,"C":240245,"O":"3","U":"http:\/\/www.drycomalcreek.com\/award-winning-wines.html","N":"Awards","T":"_top","R":"","RT":"_blank"},"a240247":{"P":229051,"ID":240248,"C":240247,"O":"4","U":"http:\/\/www.drycomalcreek.com\/directions-dry-comal.html","N":"Directions","T":"_top","R":"","RT":"_blank"},"a240249":{"P":229051,"ID":240250,"C":240249,"O":"5","U":"http:\/\/www.drycomalcreek.com\/picture-gallery-dry.html","N":"Gallery","T":"_top","R":"","RT":"_blank"},"a240309":{"P":229051,"ID":240310,"C":240309,"O":"6","U":"http:\/\/www.drycomalcreek.com\/recipesection.html","N":"Recipes","T":"_top","R":"","RT":"_blank"},"a266246":{"P":229048,"ID":266252,"C":266246,"O":"4","U":"http:\/\/www.drycomalcreek.com\/events.html","N":"Events","T":"_top","R":"","RT":"_blank"},"a264210":{"P":266246,"ID":264213,"C":264210,"O":"1","U":"http:\/\/www.drycomalcreek.com\/events-dry-comal.html","N":"Upcoming Events","T":"_top","R":"","RT":"_blank"},"a580166":{"P":266246,"ID":580370,"C":580166,"O":"2","U":"http:\/\/www.drycomalcreek.com\/groovininthegrapes.html","N":"Groovin In The Grapes","T":"_top","R":"","RT":"_blank"},"a240256":{"P":266246,"ID":240258,"C":240256,"O":"3","U":"http:\/\/www.drycomalcreek.com\/winery-u-wine.html","N":"Winery U!","T":"_top","R":"","RT":"_blank"},"a240260":{"P":266246,"ID":240261,"C":240260,"O":"4","U":"http:\/\/www.drycomalcreek.com\/private-events-meetings.html","N":"Private Events","T":"_top","R":"","RT":"_blank"},"a394046":{"P":266246,"ID":519215,"C":394046,"O":"5","U":"http:\/\/www.drycomalcreek.com\/texasvineyardwedding.html","N":"Texas Vineyard Wedding","T":"_top","R":"","RT":"_blank"},"a229053":{"P":229048,"ID":240231,"C":229053,"O":"5","U":"http:\/\/www.drycomalcreek.com\/dry-comal-creek-wine-club.html","N":"Wine Club","T":"_top","R":"","RT":"_blank"},"a240232":{"P":229048,"ID":240234,"C":240232,"O":"6","U":"http:\/\/www.drycomalcreek.com\/retail-outlets-dry.html","N":"Retail Outlets","T":"_top","R":"","RT":"_blank"},"a251213":{"P":240232,"ID":251214,"C":251213,"O":"1","U":"http:\/\/www.drycomalcreek.com\/austin-area-retail.html","N":"Austin Area","T":"_top","R":"","RT":"_blank"},"a251746":{"P":240232,"ID":251747,"C":251746,"O":"2","U":"http:\/\/www.drycomalcreek.com\/dallas-area-retail.html","N":"Dallas Area","T":"_top","R":"","RT":"_blank"},"a251748":{"P":240232,"ID":251749,"C":251748,"O":"3","U":"http:\/\/www.drycomalcreek.com\/texas-hill-country-retail.html","N":"Hill Country Area","T":"_top","R":"","RT":"_blank"},"a251750":{"P":240232,"ID":251751,"C":251750,"O":"4","U":"http:\/\/www.drycomalcreek.com\/houston-area-retail.html","N":"Houston Area","T":"_top","R":"","RT":"_blank"},"a251752":{"P":240232,"ID":251753,"C":251752,"O":"5","U":"http:\/\/www.drycomalcreek.com\/san-antonio-retail.html","N":"San Antonio Area","T":"_top","R":"","RT":"_blank"},"a310174":{"P":240232,"ID":310185,"C":310174,"O":"6","U":"http:\/\/www.drycomalcreek.com\/south-texas.html","N":"South Texas","T":"_top","R":"","RT":"_blank"},"a291681":{"P":229048,"ID":291682,"C":291681,"O":"7","U":"http:\/\/www.drycomalcreek.com\/search-page.html","N":"Search","T":"_top","R":"","RT":"_blank"},"a588580":{"P":291681,"ID":588581,"C":588580,"O":"1","U":"http:\/\/www.drycomalcreek.com\/newsletter-archive.html","N":"Newsletter Archive","T":"_top","R":"","RT":"_blank"}},alignment:"Horizontal",animate:0})});var imgSrc={};